/* UNIVERSIDADE FEDERAL DE CAMPINA GRANDE - UFCG
 * Disciplina: Estrutura de Dados e Algoritmos
 * Professor: Rohit
 * Alunos: Alexandre Sales Vasconcelos       Mat.: 20621146
 */
import java.util.LinkedList;
import java.util.Scanner;

/**
 * Classe que implementa a solucao para o problema Timus 1496
 *
 * @version 1.0 2008/07/18
 * @author Alexandre Sales Vasconcelos
 * @see <a href="http://acm.timus.ru/problem.aspx?space=1&num=1496"> Problema 1496</a>
 */

public class Spammer {

	/**
	 * Metodo principal da classe.
	 * 
	 * @param args
	 */
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		LinkedList<String> teams = new LinkedList<String>();
		LinkedList<String> repetidoTeams = new LinkedList<String>();
		String team;
		
		for (int i = 0; i <= N; i++) {
			team = sc.nextLine();
			if (!teams.contains(team)) {
				teams.add(team);
			} else if (!repetidoTeams.contains(team)){
				repetidoTeams.addFirst(team);
			}
		}
		
		for (int i = 0; i < repetidoTeams.size(); i++) {
			System.out.println(repetidoTeams.get(i));
		}
	}
}
